﻿package otherparts 
{
	import types.*;
	/**
	$(CBI)* ...
	$(CBI)* @author Sentinel
	$(CBI)*/
	public class Tank
	{
		
		public var capacity:Number; //litre
		public var type:int;
		public var content:int;
		private var load:Number; //litre
		
		
		public function Tank() 
		{
			capacity = 45;
			load = 45;
		}
		
		public function remaining():int
		{
			return load;
		}
		
		public function add(n:Number):void
		{
			load = (n + load) < capacity ? capacity : (n + load);
		}
		
	}

}